//------------------------------------------------------------------------------//
// 
// MODULE	: playersrvr.cpp
// 
// PURPOSE	: PlayerSrvr - Implementation
// 
// CREATED	: 07/15/2002
// 
// (c) 2002 LithTech, Inc.	All Rights Reserved
// 
//------------------------------------------------------------------------------//

#include "playersrvr.h"

#include <ltobjectcreate.h>

//-----------------------------------------------------------------------------
BEGIN_CLASS(player_server)
END_CLASS_DEFAULT_FLAGS(player_server, BaseClass, LTNULL, LTNULL, CF_HIDDEN)


//-----------------------------------------------------------------------------
//	CPlayerSrvr::EngineMessageFn(uint32 messageID, void *pData, float fData)
//
//-----------------------------------------------------------------------------  


//-----------------------------------------------------------------------------
//	CPlayerSrvr::PreCreate(void *pData, float fData)
//
//-----------------------------------------------------------------------------
uint32 player_server::OnPrecreate(ObjectCreateStruct *pStruct, float fData)
{
	// Let parent class handle it first
    base_type::OnPrecreate(pStruct, fData) ;
	

	pStruct->m_ObjectType = OT_MODEL;
	
	// Check to see if this is coming from a world file
	if(fData == PRECREATE_WORLDFILE)	  
	{
		read_props(pStruct);
	}
	

	return 1;
}


//-----------------------------------------------------------------------------
//	CPlayerSrvr::ReadProps(ObjectCreateStruct* pStruct)
//
//-----------------------------------------------------------------------------
void player_server::read_props(ObjectCreateStruct* pStruct)
{
	g_pLTServer->GetPropString("Name", pStruct->m_Filename, MAX_CS_FILENAME_LEN);
}
